<?php
require_once("conn.php");
require_once("functions.php");
//echo "<pre>";
//print_r($config);
$sql = "select * from `link` where type = 2";
$row_user = $mysql->query($sql);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>有妹纸</title>
		<meta name="keywords" content=""/>
		<meta name="description" content=""/>
		<meta name="apple-mobile-web-app-capable" content="yes"/>
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
		<link rel="stylesheet" type="text/css" href="./assets/css/reset.css"/>
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script>
			function changeSize() {
				var propo = $(window).width() / 640;
				$('html').css('font-size', 40 * propo + 'px');
			};
			changeSize();
			$(window).resize(function() {
				changeSize();
			});
		</script>
		<style type="text/css">
			.wrap{
				background:url(assets/images/download/bg.jpg) no-repeat;
				width: 100%;
				margin: 0 auto;
				height: 28.4rem;
				overflow: hidden;
			}
			.content img{
				display: block;
				
			}
			.logo{
				margin-top: 4rem;
			}
			
			.logo img{
				margin: 0 auto;
				width: 25%;
			}
			.download{
				margin-top: 3rem;
			}
			.download img{
				margin: 0 auto;
				width: 50%;
			}
			.ts{
				text-align: center;
				font-size: 1rem;
				color: #363636;
				margin-top: 1rem;
			}
		</style>
		<script type="text/javascript">
		$(function(){
		//判读苹果
		function isAppleMobileDevice(){
		    return (/iphone|ipod|ipad|Macintosh/i.test(navigator.userAgent.toLowerCase()));
		}
			//判断微信
		(function is_weixn(){  
		    var ua = navigator.userAgent.toLowerCase();  
		    if(ua.match(/MicroMessenger/i)=="micromessenger") {  
		        $(".wechat").css("display","block"); 
		    }
		    if(isAppleMobileDevice()){
		    	window.location.href = "http://<?php echo $row_user[0]['link']; ?>/weiApp/apple.php";
		    }
		})(); 
		});
		</script>
	</head>
	<body>
		<div class="wechat" style="position: fixed;top: 0;bottom: 0;left: 0;z-index: 999;display: none;width: 100%;height: 100%;background: rgba(0,0,0,0.5);">
			<img style="width:90%;margin-left: 5%;" src="assets/images/download/live_weixin.png">
		</div>
		<div class="wrap">
			<div class="content">
				<div class="logo">
					<img src="assets/images/download/logo.png"/>
				</div>
				<p class="ts">有妹纸App</p>
				<div class="download">
					<img  src="assets/images/download/download.png"/>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			$(".wrap").click(function(){
				window.location.href = "http://f.wangqu.me/picture/weiyue.apk";
			})
		</script>
	</body>
</html>
